<?php
/**
 * @author Nguyễn Sơn Tùng <sontung.x305@gmail.com> <Y!M: terminator_nst> <Skype : joker.x305>
 * @version: 1.0
 * @copyright fteam.vn
 * Date: 09/01/2013
 * Time: 23:14
 */
class systemSettingForm extends CFormModel {

        public $emailAdmin;
        public $emailFromReply;
        public $emailFromNoReply;
        public $emailServer;
        public $emailPort;
        public $emailUser;
        public $emailPassword;
        public $emailSSL;

        public $keep_file_name_upload;

        public $yb_username;
        public $yb_password;
        public $yb_service;
        public $yb_source;
        public $yb_authenticationURL;
        public $yb_devkey;
        public $yb_category;
        public $yb_handler_url;
        public $yb_next_url;

        public $time_zone;
        public $time_format;

        public $gzip;
        public $google_analytics;
        public $cache_time;

    public function rules()
    {
        return array(
            // username and password are required
            array('time_zone, time_format, yb_username,yb_password,yb_service,yb_source,yb_authenticationURL,yb_devkey,yb_handler_url,yb_category,emailAdmin, emailFromReply, emailFromNoReply, emailServer, emailPort, emailUser, emailPassword, emailSSL', 'required'),
            array('emailAdmin, emailFromNoReply, emailFromReply', 'email'),
            array('google_analytics,gzip', 'safe'),
            array('cache_time, emailPort, time_format','numerical','integerOnly'=>true),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels()
    {
        return array(
            'keep_file_name_upload'=>t('Keep file name when uploading','systemSettingForm'),
            'emailAdmin'=>t('Email','systemSettingForm'),
            'emailServer'=>t('EMail Server','systemSettingForm'),
            'emailPort'=>t('Port','systemSettingForm'),
            'emailUser'=>t('User','systemSettingForm'),
            'emailPassword'=>t('Password','systemSettingForm'),
            'emailSSL'=>t('SSL','systemSettingForm'),
            'yb_username'=>t('Username','systemSettingForm'),
            'yb_password'=>t('Password','systemSettingForm'),
            'yb_service'=>t('Service','systemSettingForm'),
            'yb_source'=>t('Application Name','systemSettingForm'),
            'yb_authenticationURL'=>t('Authentication Url','systemSettingForm'),
            'yb_devkey'=>t('Development key','systemSettingForm'),
            'yb_category'=>t('Youtube Category','systemSettingForm'),
            'yb_handler_url'=>t('Handler Url','systemSettingForm'),
            'time_zone'=>t('Time Zone','systemSettingForm'),
            'time_format'=>t('Time Format','systemSettingForm'),
            'gzip'=>t('GZip','systemSettingForm'),
            'google_analytics'=>t('Goolge Analytics','systemSettingForm'),
            'cache_time'=>t('Cache Time','systemSettingForm'),
        );
    }
}